<!-- created by LMJ Designed by CY,WJJ 2016/04/26-->

  <!--用响应式container 包括三个row 分辨率要改一下-->



<div class="News-container" style="background-image: url(<?php echo get_bloginfo('template_url').'/images/index/cream_dust.png' ?>);">
    <div class="container">
        <div class="row">
            <div class="new">
                <div class="title-logo">
                    <img src="<?php echo get_bloginfo('template_url').'/images/index/news2.svg' ?>" class="img-sign01" alt="">
                    <div class="h3-div-set">
                        <h2 class="h3-set-2">新闻</h2>
                        <h2 class="h3-set-EN-2">News</h2>
                    </div>
                </div>

              <section class="newL" id="newsLeft">
            <?php
              $args=array( 'posts_per_page' => 1 ,'cat'=>4);  $my_query = new WP_Query($args); 
          if ( $my_query->have_posts() ) {
            while ($my_query->have_posts()) : $my_query->the_post(); 
            ?>
                <?php
                //如果文章有缩略图就显示缩略图 否则显示指定图片
                  if(has_post_thumbnail()){ 
                ?>
                  <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('large'); ?> </a>
                <?php
                  }else{
                    $string ='<img src="givenpicture"\>';
                  }
                  echo $string;
                ?>

<?php //$thumb = get_post_thumbnail_id(); ?>
<?php //$image = vt_resize( $thumb,'' , 290, true );?>
<?php //if( !empty($image[width]) ){ ?> 
<!-- <img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" alt="image"/> -->
<?php //} ?>


                <!--标题-->
                  <a href="<?php the_permalink(); ?>" style="color:black"><h3 ><?php the_title();?></h3></a>
                <!--摘要-->
                  <?php the_excerpt(10);?>
            <?php
              endwhile; }
            ?>
              </section>


                <ul class="newR" id="newsCenter">
                <?php
                //查询参数分别为:显示4篇文章 分类号为4 从第2篇文章开始读(因为之前已经读了1篇)
                  $args=array( 'posts_per_page' => 4 ,'cat'=>4,'offset'=> 1);  $my_query = new WP_Query($args); 
                  if ( $my_query->have_posts() ) {
                    while ($my_query->have_posts()) : $my_query->the_post(); 
                      ?>
                      <li > 
                      <!--标题--> 
                         <a href="<?php the_permalink(); ?>" style="overflow:hidden"target="_blank"><?php the_title();?> </a>
                      </li>
                    <?php
                      endwhile; }
                    ?>
                      </ul>

                  <ul class="newR" id="newsRight">
                      <?php
                      //查询参数分别为:显示4篇文章 分类号为4 从第6篇文章开始读(因为之前已经读了5篇)
                        $args=array( 'posts_per_page' => 4 ,'cat'=>4,'offset'=> 5);  $my_query = new WP_Query($args); 
                  if ( $my_query->have_posts() ) {
                    while ($my_query->have_posts()) : $my_query->the_post(); 
                      ?>
                    <li >  
                           <a href="<?php the_permalink(); ?>" style="overflow:hidden"target="_blank"><?php the_title();?> </a>
                        </li>
                      <?php
                        endwhile; }
                      ?>

                  <?php if ( $homeblogview = get_option('of_home_blog_view') ) { ?>
                  <li class="last">
                  <!--查看更多-->
                      <a href="?cat=4" class="more1" style="font-size: 1.3em">更多新闻</a>
                  </li>
                  <?php } ?>

                </ul>
            </div>
        </div>
    </div>
</div>

